#include "main/utils.h"
using namespace std;

int index(const vector<int> &vec) {
  int sum = 0;
  for (int i = 0; i < vec.size(); ++i) {
    sum += vec[i];
  }
  int left = 0;
  int right = sum - vec[0];
  for (int i = 0; i < vec.size() - 1; ++i) {
    if (left == right) {
      return i;
    }
    left += vec[i];
    right -= vec[i + 1]; 
  }
  return -1;
}

int main() {
  vector<int> vec = {1, 7, 3, 6, 2, 9};
  int ret = index(vec);
  cout << ret << endl;

  return 0;
}
